-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def: macros for creating copattern definitions #376
Conversation
Can this be unified with Cat.Functor.Coherence? |
Should be able to! We will need to generalize |
Should be good to go. Played around with a version of "deep" |
Looks good, are there places we can use it? (Sheaves, I guess? But I'm not done writing that yet :/) |
Sorry, have been quite busy recently! Sheaves would be a good place, likewise for categories of free F-algebras |
Description
There are a couple of places in the 1Lab where we manually eta-expand out copattern definitions by hand to get better goal display. This mostly comes up when dealing with things like subcategories/forgetful functors; Agda will very happily unfold your nicely named category into
Restrict Blah
, which is not particularly helpful!Manually performing these copattern expansions is a bit of a pain, so this PR adds a small macro that performs this mechanical busywork for us. This removes the need for the
declare-concrete-category
macro in #375.Checklist
Before submitting a merge request, please check the items below:
support/sort-imports.hs
(ornix run --experimental-features nix-command -f . sort-imports
).If your change affects many files without adding substantial content, and
you don't want your name to appear on those pages (for example, treewide
refactorings or reformattings), start the commit message and PR title with
chore:
.